/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86187
 * Date: 2022-04-17
 * Time: 23:30
 */

//Scanner scan = new Scanner(System.in);

import java.util.Scanner;

public class RecNum {

    /**
     * 递归求n 的阶层
     * @param n
     * @return
     */
    public static int recNum(int n) {
        if(n == 1) {
            return 1;
        }

        return n * recNum(n-1);

    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int n = scan.nextInt();

        int ret = recNum(n);
        System.out.println(ret);
    }
}
